import request from 'utils/request.js'

// loginByUserName
export function login(params) {
  let data = params
  return request({
    url: '/users/getUserToken',
    method: 'post',
    data: data
  })
}
// get user infomation
export function getUserInfo(params) {
  let data = params
  return request({
    url: '/users/getUserInfoByToken',
    method: 'post',
    data: data
  })
}
// register
export function register(params) {
  let data = params
  return request({
    url: '/users/addUser',
    method: 'post',
    data: data
  })
}
